package com.anclick.englishword;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;


public class DBHelper extends SQLiteOpenHelper{
	public DBHelper (Context context) {
		super(context, "wordsdb.db" , null , 1);
	}
	
	@Override
	public void onCreate(SQLiteDatabase db) {
		String table =
			"CREATE TABLE words (" + "_id INTEGER PRIMARY KEY AUTOINCREMENT , " + "word TEXT NOT NULL,url TEXT NOT NULL);";
		db.execSQL(table);
	}
	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL("DROP TABLE IF EXISTS words");
		onCreate(db);
	}

}